package com.zhouthanos.activity;

import java.io.File;

import com.zhouthanos.mybbs.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Environment;

public class WelcomeActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_welcome);
		initSettings();
		File cache = new File(Environment.getExternalStorageDirectory(), "DUTBBS");
		if(!cache.exists()){
			cache.mkdirs();
		}
		new StartLoginActivity(this,new Intent(this,LoginActivity.class)).start();
	}

    void initSettings(){
    	
    }
    
    class StartLoginActivity extends Thread{
    	private Intent intent;
    	private Activity activity;
    	
    	public StartLoginActivity(Activity activity, Intent intent) {
			this.activity=activity;
    		this.intent=intent;
		}
		public void run(){
    		try {
				Thread.sleep(1000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
    		activity.startActivity(intent);
    		finish();
    	}
    
}


}
